package com.xudd.third.websocket;

import javax.websocket.OnMessage;
import javax.websocket.Session;
import javax.websocket.server.ServerEndpoint;
import java.io.IOException;

@ServerEndpoint("/reverse")
public class ReverseWebSocketEndpoint {
	@OnMessage
	public void handleMessage(Session session,String message) throws IOException {
		session.getBasicRemote().sendText("Reversec:"+ new StringBuilder(message).reverse());
	}

}
